package com.wwz.tcc;

import com.alibaba.fastjson.JSONObject;
import io.seata.rm.tcc.api.BusinessActionContext;
import io.seata.rm.tcc.api.BusinessActionContextParameter;
import io.seata.rm.tcc.api.LocalTCC;
import io.seata.rm.tcc.api.TwoPhaseBusinessAction;

import java.util.List;

@LocalTCC
public interface TccOrderService {
    //@TwoPhaseBusinessAction(name="orderService" )
    Integer insert(BusinessActionContext businessActionContext,@BusinessActionContextParameter(paramName = "name") String name,@BusinessActionContextParameter(paramName = "branchId")long branchId);

    @TwoPhaseBusinessAction(name="orderService1" )
    Integer batchInsert(BusinessActionContext businessActionContext, @BusinessActionContextParameter(paramName = "list")String list,@BusinessActionContextParameter(paramName = "branchId")long branchId);

    boolean commit(BusinessActionContext businessActionContext);

    boolean rollback(BusinessActionContext businessActionContext);
}
